]> permondes.de Git - Analog_Engine.git/blame - scripts/TP1 07.19 Falling Mass.SALSA
Focus on potential fields
[Analog_Engine.git] / scripts / TP1 07.19 Falling Mass.SALSA
CommitLineData
56968557
P
1# Wiring mache ich von links nach rechts !!!
2
3...IDENTIFICATION DIVISION
4...PROGRAM-ID FallingParticle
5...VERSION 20240225
6...COMMENT Calculate the deflection from the vertical caused by the Earth's rotation of a particle falling freely from rest from a height h.
7...COMMENT Differential Equations:
8...COMMENT x''=-bz'+ay' # x-axis is along latitude, directed to east
9...COMMENT y''=-ax' # y-axis is along longitude, directed to north
10...COMMENT z''=-g+ax' # z-axis is perpendicular to the surface of earth
11...COMMENT g: gravitational acceleration = 9,81 m/s²
12...COMMENT a: 2*omega*sin(phi)
13...COMMENT b: 2*omega*cos(phi)
14...COMMENT omega: rotation velocity of the earth = 2*pi/day
15...COMMENT phi: Latitude of location (0-90°)
16...COMMENT Initial Condition: z(0)=h
17...COMMENT The full solution requires 6 INTEGRATORs, Anabrid-THAT just has 5. The deflection to longitude (y) is neglegible and can be omitted (marked #*).
18...COMMENT It could also be solved in a separated algorithm omitting x.
19
20...ENVIRONMENT DIVISION
21...TIMEBASE 1ms
22
23...DATA DIVISION
24SET COEFFICIENT.1 TO AY # 2*2pi/day*sin(phi)
25SET COEFFICIENT.2 TO AX # = AY
26SET COEFFICIENT.3 TO B # 2*2pi/day*cos(phi)
27SET COEFFICIENT.4 TO G # gravitational acceleration = 9,81 m/s²
28SET COEFFICIENT.5 TO H # height h
29SET OUTPUT.X TO x
30SET OUTPUT.Y TO y
31SET OUTPUT.Z TO z
32
33INITIALIZE H by -1 TO -h # same as COMPUTE -1 TIMES H TO -h
34INITIALIZE G by +1 TO g
35
36INTEGRATE 1*-bz',1*ay' TO -x' # Input is x''
37INTEGRATE -x' TO x
38
39INTEGRATE y'' TO -y'
40INTEGRATE -y' TO y
41
42INTEGRATE z'' TO -z'
43INTEGRATE -z', IC:-h, LIMIT:(z >= 0) TO z
44
45-x' * AX -> -ax'
46-ax' = y''
47-y' * AY -> -ay'
48INVERT -ay' TO ay'
49-z' * B -> -bz'
50ADD 1*-ax', 1*g TO -g+ax'
51-g+ax' = z''
52
53...OPERATION DIVISION
54...MODE REPEAT
55...OP-TIME 7,3ms